//
//  CookingCell.m
//  project_delicious
//
//  Created by dlios on 15-3-25.
//  Copyright (c) 2015年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "CookingCell.h"

@implementation CookingCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.picImageView = [[UIImageView alloc] init];
        [self.contentView addSubview:self.picImageView];
        [_picImageView release];
        
        self.nameLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.nameLabel];
        [_nameLabel release];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    CGFloat widths = self.bounds.size.width;
    CGFloat heights = self.bounds.size.height;
    self.picImageView.frame = CGRectMake(0, 0, widths * 2 / 3, heights);
    self.nameLabel.frame = CGRectMake(widths * 2 / 3, 0, widths / 3, heights);
    self.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"cellB.jpg"]];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
